Skip to content

Added support for gcode generated in Prusa and Orca slicer #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 46 commits into
base: master
Choose a base branch
from

Conversation

WatchingWatches
Copy link

The script can be executed by Orca and Prusa slicer as an post-processing script with an optional user dialog to input the variables. To support the gcode of those slicers, i had to change the comments of the functions, which search for the feature type. Searching for specific characters resulted in errors in process_gcode, when they were found in comments, which is why i used re patterns instead.

The scripts can either be executed when saving the file in the slicer or manually within an IDE.

Danke für deine Arbeit für die Community.

@Ninjamurai
Copy link

Hello,
im not that much into python, so i dont really know what to do with the following error: Use default values (declared in the script)? [y] to proceed
y
Traceback (most recent call last):
File "C:\Program Files\OrcaSlicer\orca_addGradientinfill.py", line 482, in
process_gcode(
File "C:\Program Files\OrcaSlicer\orca_addGradientinfill.py", line 417, in process_gcode
lastPosition = getXY(currentLine)
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\OrcaSlicer\orca_addGradientinfill.py", line 177, in getXY
return Point2D(float(elementX), float(elementY))
^^^^^^^^^^^^^^^
ValueError: could not convert string to float: ''

i changed every setting that needet to be changed. (I use orca slicer)

@WatchingWatches
Copy link
Author

Hello, im not that much into python, so i dont really know what to do with the following error: Use default values (declared in the script)? [y] to proceed y Traceback (most recent call last): File "C:\Program Files\OrcaSlicer\orca_addGradientinfill.py", line 482, in process_gcode( File "C:\Program Files\OrcaSlicer\orca_addGradientinfill.py", line 417, in process_gcode lastPosition = getXY(currentLine) ^^^^^^^^^^^^^^^^^^ File "C:\Program Files\OrcaSlicer\orca_addGradientinfill.py", line 177, in getXY return Point2D(float(elementX), float(elementY)) ^^^^^^^^^^^^^^^ ValueError: could not convert string to float: ''

i changed every setting that needet to be changed. (I use orca slicer)

Hi could you send me a 3mf file with your settings saved and/or the gcode you used, which gave you the error?
You can send those via discord to "bene_j". I haven't seen this error so far and i need additional information to help you.

@WatchingWatches
Copy link
Author

Hi @CNCKitchen,
the latest version of the script is compatible with Prusa, Orca, Bambu and Cura slicer. The slicer is automatically recognized by the script. Additionally i implemented a volumetric flow limit, where the feedrate is lowered to ensure, that the hotend can keep up.

In combination with small segment mode i added a option to make the inner core as thin as the minimum line width.

Thanks to everyone who reported issues with the script.

Here are a few pictures to show the latest implemented flow limit.
Speed
Flow

@damianjurkiewicz
Copy link

This is absolutely genius! It even works with gyroid, which is my favorite, (due to looks, speed, and mechanical properties).
I'm also thinking about other type of gradual density, where we change infill density on each layer.
For example, for 7 layers:

  1. 90%
  2. 75%
  3. 50%
  4. 25%
  5. 50%
  6. 75%
  7. 90%
    It's possible to do it manually, though, with Prusa's Height Range Modifier, but for bigger models it's a nightmare.

@WatchingWatches
Copy link
Author

Thanks for your interest in the project. If you mean with infill density infill line width, I've already done something similar. The script itself is very simple and a standalone script. It's hidden at this branch.This script modifys the flow with M221 command (test if your firmware isn't limiting this), normally used to compensate under or overextrusion. The flow is changed based on height and starts for example at 70% and ends at 150% or the other way around. What you described is also possible by changing the code slightly. The script changes the flow of the whole layer at the infill and isn't calculated based on the distance to the next wall.

The gradient is especially interesting to change the toughness of TPU (I also was in contact with a company, which was interested in this commercially).

In general if you understand the script well enough you can input imaginary walls yourself and create soft and hard zones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants